//
//  BaseModel.m
//  
//
//  Created by hansong on 3/6/16.
//  Copyright © 2016年 hansong. All rights reserved.
//

#import "BaseModel.h"

@implementation BaseModel

- (void)setValue:(id)value forUndefinedKey:(NSString *)key{
    
}

- (void)setNilValueForKey:(NSString *)key{

    [self setValue:@"" forKey:key];
}

- (void)setValue:(id)value forKey:(NSString *)key{
    // 将后台返回的数字类型转换为字符串
    if ([value isKindOfClass:[NSNumber class]]) {
        
        value = [NSString stringWithFormat:@"%ld", [(NSNumber *)value integerValue]];
     
    }
    [super setValue:value forKey:key];
}

@end
